PEDeleteNthSortField

Use PEDeleteNthSortField to remove the specified sort field from the sort order. This function is used as part of a Custom-Print Link whenever you want to delete sort fields that were established for the report at design time. When you give the user the ability to delete sort field(s) at print time, your link must include code to replace sortFieldN with user-generated values.

This function can be used by itself to delete an existing sort field when the sort field number is already known or as one of a series of functions (PEGetNSortFields, called once; var reportAlertInfo : PEReportAlertInfo) : boolean stdcall; and PEGetHandleString called together as many times as needed to identify the correct sort field; and PEDeleteNthSortField called once, when the correct sort field is identified). The series can be used in a Custom-Print Link to identify and then delete an existing sort field and/or sort order in response to a user selection at print time.

C Syntax
BOOL CRPE_API PEDeleteNthSortField (
        short printJob,
        short sortFieldN );
Parameters

printJob

Specifies the print job from which you want to delete a sort field.

sortFieldN

Specifies the 0-based number of the sort field you want to delete. The first sort field is field 0. If N = 0, the function will delete the first sort field, If the report has N sort fields, you can call the function with sortFieldN between 0 and N-1.

Returns
Remarks

This function should be called before PEStartPrintJob, or the results may be inconsistent or unexpected.

VB Syntax
Declare Function PEDeleteNthSortField Lib "crpe32.dll" ( _
    ByVal printJob As Integer, ByVal SortFieldN As Integer ) As Integer
Delphi Syntax
function PEDeleteNthSortField (
    printJob: Word;
    sortFieldN: integer
    ): Bool stdcall;
dBASE for Windows Syntax

EXTERN CLOGICAL PEDeleteNthSortField (CWORD, CWORD) CRPE.DLL



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com